<%@page pageEncoding="UTF-8"%>
<!-- *************************************** START OF HEADER FILE -->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div id="masthead" class="masthead">
  <table cellpadding="0" cellspacing="0" >
    <tr>
	<c:choose>
		<c:when test='${empty sessionScope.username || !empty param.editfile}'>
		      <td width="100%">
			<!-- <img src="img/metrumHeader.jpg" width="100" height="40" /> -->
			 <a href="http://metruminstitute.org/" target="_blank"> <img src="img/mrglogo.gif" border="0" width="151" height="44" /> </a>
		      </td>
		</c:when>
		<c:otherwise>
		      <td >
			<!-- <img src="img/metrumHeader.jpg" width="100" height="40" /> -->
			<img src="img/mrglogo.gif" width="151" height="44" />
		      </td>
		      <td width="100%" align="left" valign="bottom" class="masthead">
			<p>You are logged in as <b><%= session.getAttribute("username")%></b>.
			
			<c:url value="Browser.jsp" var="browserURL">
				<c:if test='${!empty sessionScope.browserSort}'>
					<c:param name="sort" value="${sessionScope.browserSort}" />
				</c:if>
				<c:if test='${!empty sessionScope.browserDir}'>
					<c:param name="dir" value="${sessionScope.browserDir}" />
				</c:if>
			</c:url>

			<c:url value="guide.jsp" var="guideURL" />
			<c:url value="SessionPage.jsp" var="rURL" />
			<c:url value="change.jsp" var="changeURL" />
			<c:url value="Models.jsp" var="modelsURL" />
			<c:url value="SendPdf" var="plotURL" />
                        <c:url value="NONMEM/index.htm" var="NONMEMURL" />
			<c:url value="logout.jsp" var="logoutURL" />
			<a href='<c:out value="${browserURL}" />'>Home</a> |
			<a href='<c:out value="${guideURL}" />'>Guide</a> | 
			<a href='<c:out value="${rURL}" />'>R</a> | 
			<a href='<c:out value="${changeURL}" />'>Password</a> | 
			<a href='<c:out value="${modelsURL}" />'>Models</a> |
			<a href='<c:out value="${plotURL}" />' target='_blank'>Plot</a> |
                        <a href='<c:out value="${NONMEMURL}" />'>NONMEM Help</a> |
			<a href='<c:out value="${logoutURL}" />'>Logout</a>
			</p>
		      </td>
		</c:otherwise>
	</c:choose> 
    </tr>
  </table>
</div>
<!-- *************************************** END OF HEADER FILE -->

